<%= content_for :styles do %>
  <%= stylesheet_link_tag "notifications" %>
<% end %>
<%= content_for :scripts do %>
  <%= javascript_include_tag "notifications" %>
<% end %>

<div class="sidebar">
  <div class="box">
    <div class="content">
      <%= link_to t("common.mark_all_as_read"), mark_all_as_read_notifications_path, :class => 'btn', :method => :put, :remote => true, :disable_with => '标记所有为已读...' %>
    </div>
  </div>
</div>

<div class="content">
  <div id="notifications" class="box">
    <h1>提醒</h1>
    <table>
      <tbody>
        <% @notifications.each do |notification| -%>
          <tr id="<%= notification.anchor %>">
            <%= render :partial => "notifications/#{notification.class.name.underscore}", :locals => {:notification => notification} %>
            <td class="last">
              <%= link_to t("common.delete"), notification_path(notification), :method => :delete, :remote => true, :class => 'label delete' %>
            </td>
          </tr>
        <% end -%>
      </tbody>
    </table>
    <%= will_paginate @notifications %>
  </div>
</div>
